home *** CD-ROM | disk | FTP | other *** search
/ All for Cell Phones: Sony Ericsson / Sony-Ericsson 2004.iso / Java / EmailViewer / Origin / EmailViewer.jar / s.class (.txt) < prev    next >
Encoding:
Java Class File  |  2003-08-05  |  1.1 KB  |  81 lines

  1. import java.io.IOException;
  2. import java.io.InputStream;
  3.  
  4. // $FF: renamed from: s
  5. class class_0 extends InputStream {
  6.    // $FF: renamed from: a java.io.InputStream
  7.    protected InputStream field_0;
  8.    // $FF: renamed from: c int
  9.    protected int field_1 = 0;
  10.    // $FF: renamed from: b byte
  11.    private byte field_2;
  12.  
  13.    public class_0(InputStream var1, byte var2) {
  14.       this.field_0 = var1;
  15.       this.field_2 = var2;
  16.    }
  17.  
  18.    public int available() throws IOException {
  19.       return this.field_0.available();
  20.    }
  21.  
  22.    public void close() throws IOException {
  23.       this.field_0.close();
  24.    }
  25.  
  26.    public int read() throws IOException {
  27.       int var1 = this.field_0.read();
  28.       if (var1 != -1) {
  29.          ++this.field_1;
  30.       }
  31.  
  32.       return var1;
  33.    }
  34.  
  35.    public int read(byte[] var1) throws IOException {
  36.       return this.read(var1, 0, var1.length);
  37.    }
  38.  
  39.    public int read(byte[] var1, int var2, int var3) throws IOException {
  40.       if (this.field_2 != 3) {
  41.          if (this.field_2 == 4 && var3 > 256) {
  42.             var3 = 256;
  43.          }
  44.  
  45.          int var6 = this.field_0.read(var1, var2, var3);
  46.          if (var6 > 0) {
  47.             this.field_1 += var6;
  48.          }
  49.  
  50.          return var6;
  51.       } else if (var2 >= 0 && var3 >= 0 && var2 + var3 <= var1.length) {
  52.          int var4;
  53.          int var5;
  54.          for(var4 = 0; var4 < var3; var1[var2 + var4++] = (byte)var5) {
  55.             var5 = this.field_0.read();
  56.             if (var5 == -1) {
  57.                if (var4 == 0) {
  58.                   return -1;
  59.                }
  60.                break;
  61.             }
  62.  
  63.             ++this.field_1;
  64.          }
  65.  
  66.          return var4;
  67.       } else {
  68.          throw new IndexOutOfBoundsException();
  69.       }
  70.    }
  71.  
  72.    public long skip(long var1) throws IOException {
  73.       long var3 = this.field_0.skip(var1);
  74.       if (var3 > 0L) {
  75.          this.field_1 += (int)var3;
  76.       }
  77.  
  78.       return var3;
  79.    }
  80. }
  81.